---
id: 6557716aadbd2d9c42c0e69a
title: Step 14
challengeType: 20
dashedName: step-14
---

# --description--

Add one last node, `D`, which is connected with `A` and `C`. Modify your dictionary to represent this structure. Again, use a list to represent multiple connections.

# --hints--

Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`.

```js
({ test: () => assert(__pyodide.runPython(`
    graph = __locals.get("my_graph")
    key_list = ["A", "B", "C", "D"]
    len(graph) == 4 and all(key in graph for key in key_list)
  `))
})
```

`my_graph["A"]` should be a list.

```js
({ test: () => assert(__pyodide.runPython(`
    graph = __locals.get("my_graph")
    type(graph["A"]) is list
  `))
})
```

`my_graph["A"]` should be a list containing `B` and `D`.

```js
({ test: () => assert(__pyodide.runPython(`
    graph = __locals.get("my_graph")
    len(graph["A"]) == 2 and "B" in graph["A"] and "D" in graph["A"]
  `))
})
```

`my_graph["B"]` should be a list.

```js
({ test: () => assert(__pyodide.runPython(`
    graph = __locals.get("my_graph")
    type(graph["B"]) is list
  `))
})
```

`my_graph["B"]` should be a list containing `A` and `C`.

```js
({ test: () => assert(__pyodide.runPython(`
    graph = __locals.get("my_graph")
    len(graph["B"]) == 2 and "A" in graph["B"] and "C" in graph["B"]
  `))
})
```

`my_graph["C"]` should be a list.

```js
({ test: () => assert(__pyodide.runPython(`
    graph = __locals.get("my_graph")
    type(graph["C"]) is list
  `))
})
```

`my_graph["C"]` should be a list containing `B` and `D`.

```js
({ test: () => assert(__pyodide.runPython(`
    graph = __locals.get("my_graph")
    len(graph["C"]) == 2 and "B" in graph["C"] and "D" in graph["C"]
  `))
})
```

`my_graph["D"]` should be a list.

```js
({ test: () => assert(__pyodide.runPython(`
    graph = __locals.get("my_graph")
    type(graph["D"]) is list
  `))
})
```

`my_graph["D"]` should be a list containing `A` and `C`.

```js
({ test: () => assert(__pyodide.runPython(`
    graph = __locals.get("my_graph")
    len(graph["D"]) == 2 and "A" in graph["D"] and "C" in graph["D"]
  `))
})
```

# --seed--

## --seed-contents--

```py
--fcc-editable-region--
my_graph = {
    'A': 'B',
    'B': ['A', 'C'],
    'C': 'B'
}
--fcc-editable-region--
```
